package com.manage.func.booksmanagement.childrenbooks.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.manage.base.dao.impl.BaseDaoImpl;
import com.manage.func.booksmanagement.childrenbooks.dao.IChildrenBooksDao;
import com.manage.func.booksmanagement.childrenbooks.model.ChildrenBooksBean;

@Repository("childrenBooksDao")
public class ChildrenBooksDaoImpl extends BaseDaoImpl<ChildrenBooksBean>implements IChildrenBooksDao {

	@Override
	public List<ChildrenBooksBean> selectChildrenBooksList(ChildrenBooksBean bean) {
		return getSqlSession().selectList("ChildrenBooksMapper.selectChildrenBooksList", bean);
	}

	@Override
	public int insertChildrenBooks(ChildrenBooksBean queryBean) {
		return getSqlSession().insert("ChildrenBooksMapper.insertChildrenBooks", queryBean);
	}

	@Override
	public int updateChildrenBooks(ChildrenBooksBean queryBean) {
		return getSqlSession().update("ChildrenBooksMapper.updateChildrenBooks", queryBean);
	}

	@Override
	public int selectTotalCount(ChildrenBooksBean queryBean) {
		return getSqlSession().selectOne("ChildrenBooksMapper.selectTotalCount", queryBean);
	}

	@Override
	public int deleteChildrenBooks(ChildrenBooksBean queryBean) {
		return getSqlSession().delete("ChildrenBooksMapper.deleteChildrenBooks", queryBean);
	}

}
